package HashBucket;

public class HashBUck {
    static class Node{
        public int key;
        public int val;
        public Node next;
        public Node(int key,int val){
            this.val=val;
            this.key=key;
        }
    }
    public Node[] array;
    public int usedSize;
    public HashBUck(){
        array=new Node[10];
    }
    public void put(int key,int val){
        int index=key%array.length;
        Node cur=array[index];
        while (cur!=null){
            if(cur.key==key){
                cur.val=key;
                return;
            }

        }
    }
}
